home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C / Frameworks / TransSkel 3.24 / Source / Control Stuff / SkelHiliteControl.c < prev    next >
Text File  |  1996-01-17  |  788b  |  26 lines

  1. /*
  2.  * Set hiliting value of control.  Differs from HiliteControl() in that
  3.  * the control is not set it if it already has that value, in order to minimize
  4.  * drawing.  Returns true if the value was actually changed, false if not.
  5.  *
  6.  * Returning the value can be useful in conjunction with push buttons surrounded
  7.  * by a heavy outline.  When the button is dimmed, the outline should go dim.
  8.  * When the button is made active, the outline should be black.  By knowing
  9.  * whether the hiliting value actually changed, outline redrawing can be skipped
  10.  * when it's unnecessary.
  11.  */
  12.  
  13. # include    "TransSkel.h"
  14.  
  15.  
  16. pascal Boolean
  17. SkelHiliteControl (ControlHandle ctrl, short hilite)
  18. {
  19.     if ((**ctrl).contrlHilite != hilite)
  20.     {
  21.         HiliteControl (ctrl, hilite);
  22.         return (true);
  23.     }
  24.     return (false);
  25. }
  26.